class CreateStudentGroupLinks < ActiveRecord::Migration
  def change
    create_table :student_group_links do |t|
      t.primary_key :id
      t.integer :student_id
      t.integer :student_group_id
      t.references :student_group
    end
    #auto generate first user as admin
    admin_user_link = StudentGroupLink.new(:student_id => 1, :student_group_id => 1)
    admin_user_link.save
  end
end
